﻿<UserControl x:Class="UploadClient.View.FastConfig"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:UploadClient"
             xmlns:ex="clr-namespace:UploadClient.Framework">
    
    <UserControl.Resources>
        <ObjectDataProvider x:Key="lang" ObjectType="{x:Type local:LocalizationManager}" MethodName="GetLanguageObjects"/>
    </UserControl.Resources>
    
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <ItemsControl ItemsSource="{Binding PluginConfig}">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <CheckBox Content="{Binding DisplayText}" ToolTip="{Binding Hint}" IsChecked="{Binding PluginEnabled}" Margin="0,6,0,0"/>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
        <Button Grid.Column="1" ToolTip="{local:Localization Key=UPL_0019}" Command="{Binding OpenConfig}" Margin="11,0,11,0"
                VerticalAlignment="Top" Content="{StaticResource spanner}" Style="{StaticResource buttonStyleNew}"/>
        <ComboBox Grid.Column="2" VerticalAlignment="Top" UseLayoutRounding="True" Background="{x:Null}" 
                  ToolTip="{local:Localization Key=UPL_0026}" BorderBrush="{x:Null}" Foreground="{x:Null}" 
                  ItemsSource="{Binding Source={StaticResource lang}}" SelectedValuePath="Key" SelectedValue="{Binding SelectedLanguage}" >
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <Image Source="{Binding Flag}" Width="25" Height="25"/>
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>
    </Grid>
</UserControl>
